package com.studyroom.controller;

import com.studyroom.common.Result;
import com.studyroom.entity.User;
import com.studyroom.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("/admin/user")
public class AdminUserController {
    
    @Autowired
    private UserService userService;
    
    @GetMapping("/list")
    public Result<List<User>> list() {
        List<User> users = userService.list();
        // 清除敏感信息
        users.forEach(user -> user.setPassword(null));
        return Result.success(users);
    }
    
    // ... 其他方法 ...
} 